import { Group } from '@/components/pro-panel/index.typing';
import { useStageStore } from '@/store/stage';

export enum LayerTypeEnum {
  常规区域面 = 'POLYGON',
  水体效果 = 'WATER',
}
const useGroup = () => {
  const stageStore = useStageStore();
  const group: Group = {
    title: '基础设置',
    key: 'basic',
    collapsed: false,
    columns: [
      {
        label: '样式',
        prop: 'specularMap',
        type: 'slot',
        visible: stageStore.layerData.specularMap ? true : false,
      },
      {
        label: '图层类型',
        prop: 'type',
        type: 'select',
        options: LayerTypeEnum,
      },

      {
        label: '坐标1(左上角)',
        prop: 'data.specularMapExtent.0',
        type: 'input',
        span: 11,
        visible: stageStore.layerData.specularMap ? true : false,
      },
      {
        label: ' ',
        prop: 'data.specularMapExtent.1',
        type: 'input',
        span: 11,
        visible: stageStore.layerData.specularMap ? true : false,
      },
      {
        label: '坐标2(右上角)',
        prop: 'data.specularMapExtent.2',
        type: 'input',
        span: 11,
        visible: stageStore.layerData.specularMap ? true : false,
      },
      {
        label: ' ',
        prop: 'data.specularMapExtent.3',
        type: 'input',
        span: 11,
        visible: stageStore.layerData.specularMap ? true : false,
      },
      {
        label: '离地高度',
        prop: 'height',
        type: 'select',
        options: [],
        span: 11,
        formProps: { placeholder: '无/按字段' },
      },
      {
        label: ' ',
        prop: 'addIconSlot',
        type: 'slot',
        span: 2,
      },
      {
        label: ' ',
        prop: 'height',
        type: 'input-number',
        span: 11,
        formProps: { controls: false },
      },
    ],
  };
  return group;
};
export default useGroup;
